#include "stdafx.h"

#include "IndexedTXTFile.h"


IndexedTXTFile::IndexedTXTFile(std::string& filename, IndexesToSearch& index): index(index)
{
	this->filename = filename;
}

std::set<std::string>* IndexedTXTFile::search(std::set<std::string>& wordSet, struct searchParameters params)
{
	return index.containsWords(wordSet,filename);

	//std::set<std::string>* result = new std::set<std::string>();
	//
	//for(std::set<std::string>::iterator it = wordSet.begin(); it != wordSet.end(); it++)
	//{
	//	std::string word = *it;

	//	if(index.containsWord(word, filename))
	//	{
	//		result->insert(word);
	//	}
	//}

	//return result;
}

IndexedTXTFile::~IndexedTXTFile()
{
}
